package com.bdqn.springbootwebsocket.config;

import jakarta.websocket.server.ServerEndpoint;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

@Configuration
public class MyWebSocketConfig {

    //为了让springboot能扫描到@ServerEndpoint注解的类，需要添加该配置springboot能扫描到@ServerEndpoint注解的类，需要添加该配置
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }
}
